package com.glowdayz.glowmee.bc;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.glowdayz.common.DBHandler;
import com.glowdayz.glowmee.dao.FirstCategoryDAO;

public class InsertHotProductBC extends HttpServlet {
	
	private static final long serialVersionUID = 1L;
       
    public InsertHotProductBC() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		DBHandler.getInstance().connect();
		
		request.setCharacterEncoding("utf-8");
		
		try {
			request.setAttribute("first", FirstCategoryDAO.getInstance().getFirstCategoryList(1, -1, "isDisplay=1"));
		} catch (Exception e) {
			DBHandler.getInstance().disconnect();
			e.printStackTrace();
		}
		
		DBHandler.getInstance().disconnect();
		RequestDispatcher dpr = request.getRequestDispatcher("/product/insertHotProduct.jsp");
		dpr.forward(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
	}

}